﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;

public class CallLuaClass
{
    public int testInt;
    public float testFloat;
    public bool testBool;
    public string testString;
    public UnityAction testFunc;
    public UnityAction<CallLuaClass> testFunc2;
    public TestInClass testInClass;
}

public class TestInClass
{
    public bool testBool;
}

public class Lesson7_CallClass : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        LuaMgr.GetInstance().Init();
        LuaMgr.GetInstance().DoLuaFile("Main");
        
        CallLuaClass testClass = LuaMgr.GetInstance().Global.
            Get<CallLuaClass>("testClass");
        
        Debug.Log("____________________________");
        Debug.Log(testClass.testBool);
        Debug.Log(testClass.testFloat);
        testClass.testFunc();
        testClass.testFunc2(testClass);
        Debug.Log(testClass.testInClass.testBool);
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
